package com.ccloud.common.core.utils;

import java.util.concurrent.ConcurrentHashMap;

/**
 * @version V1.0
 * @Title: UtilConstants.java
 * @Description: 常量类
 * @date 2018年3月19日 上午9:58:17
 */
public interface ConstantUtils {


    /**
     * 公共常量
     */
    class Public {
        //通用id字符串
        public static final String ID = "id";
        //航班号时间格式化
        public static final String DATE_FORMAT_MIN_2 = "yyyy-MM-dd HH:mm:ss";
        //中文格式化
        public static final String DATE_FORMAT_MIN_CN = "yyyy年MM月dd HH时mm分ss秒";
        //时间格式3
        public static final String DATE_FORMAT_MIN_3 = "yyyyMMdd";
        //时间格式4
        public static final String DATE_FORMAT_MIN_4 = "yyyy-MM-dd";
        //时间格式5
        public static final String DATE_FORMAT_MIN_5 = "yyyyMMddHHmm";
        //时间格式6
        public static final String DATE_FORMAT_MIN_6 = "yyyy-MM-dd HH:mm";
        //删除标记
        public static final String DELFLAG = "delflag";
        //时间格式化到分钟
        public static final String DATE_FORMAT_MIN = "yyyyMMddHHmmss";
        //数字1
        public static final int ONE = 1;
        //数字2
        public static final int TWO = 2;
        //数字3
        public static final int THREE = 3;
        //数字4
        public static final int FOUR = 4;
        //数字5
        public static final int FIVE = 5;
        //字符1
        public static final String STR_ONE = "1";
        //数字0
        public static final int ZERO = 0;
        //字符-1
        public static final String MINUS_ONE = "-1";
        //字符0
        public static final String STR_ZERO = "0";
        //字符2
        public static final String STR_TWO = "2";
        //字符3
        public static final String STR_THREE = "3";
        //字符4
        public static final String STR_FOUR = "4";
        //Excel注解name
        public static final String NAME = "name";
        //Message注解属性
        public static final String MESSAGE = "message";
        //城市
        public static final String COUNTRY = "country";
        //中国
        public static final String CN = "CN";
        //导出excel目录名称
        public static final String DIR_EXCEL = "excel";
        //创建人
        public static final String CREATEBY = "createby";
        //操作人
        public static final String UPDATEBY = "updateby";
        //Model Attr -- item
        public static final String ITEM = "item";
        //状态
        public static final String STATUS = "status";
        //减号
        public static final String MINUS = "-";
        //第三方ID
        public static final String THIRD_ID = "thirdId";
        //密码
        public static final String PASS_WORD = "password";
        //用户名
        public static final String USER_NAME = "username";
        //grantType  all
        public static final String ALL = "all";
        //授权类型
        public static final String GRANT_TYPE = "grant_type";
        //范围
        public static final String SCOPE = "scope";
        //过期时间24小时
        public static final Integer THIRTY_DAYS_SECONDS = 86400;
        //过期时间 2h
        public static final Integer TWO_HOURS = 7200;
        //关联表中的博客id
        public static final String BLOG_ID = "blogId";

    }


    /**
     * 正则表达式
     */
    class Regex {
        //十一位数字或字母的组合
        public static final String REGEX_TYPE_1 = "^[0-9]{11}+$";
        //只能包含字母和数字
        public static final String REGEX_TYPE_2 = "^[a-zA-Z0-9]+$";
        //正整数或小数(最多保留2位小数)
        public static final String REGEX_TYPE_3 = "^([\\d]+(\\.\\d{1,2})?$)|(^[1-9]\\d*$)";
        //数字
        public static final String REGEX_TYPE_4 = "^[1-9]\\d*$";

    }

    /**
     * 提示信息
     */
    class Message {


    }

    /**
     * vo 对象的一些公共的属性名称
     */
    class VoFields {

        //登录验证redis存储键名
        public static final String LOGIN_VALIDATE = "LOGIN_VALIDATE";

    }

    /**
     * common map -放入缓存
     */
    ConcurrentHashMap<String, Object> CommonMap = new ConcurrentHashMap<String, Object>();

}